let resizeConfig = {

  fontResize: 0,
  resize: function (pxHeight, remHeight) {
    window.onresize = () => {
      resize();
    };

    function resize() {
      var i = document.documentElement;
      var h = i.clientHeight;
      // 注释这两行
      var fontResize = (h / remHeight) + "px";
      i.style.fontSize = fontResize;
      //			console.log(fontResize)
      localStorage.setItem('global_Rem', pxHeight / remHeight);
      localStorage.setItem('global_fontSize', fontResize);
    }
  },

  toRem: function (size) {
    //				console.log(localStorage.getItem('global_Rem'))
    //				console.log(localStorage.getItem('global_fontSize'))
    //		return localStorage.getItem('global_fontSize').replace("px", "") * size /
    // localStorage.getItem('global_Rem');
    return localStorage.getItem('global_fontSize').replace("px", "") * size;
  }
};

export default {
  resizeConfig,
  resize: resizeConfig.resize,
  install(Vue) {
    Vue.prototype.$toRem = resizeConfig.toRem;
  }
};
